package com.d.client.dto;

import java.util.List;

public class DingProcessInstanceWirteDTO {
    /**
     * originatorUserId : String
     * processCode : String
     * deptId : Long
     * microappAgentId : Long
     * approvers : [{"actionType":"String","userIds":["String"]}]
     * ccList : ["String"]
     * ccPosition : String
     * targetSelectActioners : [{"actionerKey":"String","actionerUserIds":["String"]}]
     * formComponentValues : [{"name":"String","value":"String"}]
     * RequestId : String
     */

    private String originatorUserId;//审批发起人的userId。
    private String processCode;
    private String deptId;
    private String microappAgentId;
    /**
     * 抄送时间点，取值：
     * <p>
     * START：开始时抄送
     * <p>
     * FINISH：结束时抄送
     * <p>
     * START_FINISH：开始和结束时都抄送
     */
    private String ccPosition;
    private String RequestId;
    private List<ApproversBean> approvers;
    private List<String> ccList;
    private List<TargetSelectActionersBean> targetSelectActioners;
    private List<FormComponentValuesBean> formComponentValues;

    public String getOriginatorUserId() {
        return originatorUserId;
    }

    public void setOriginatorUserId(String originatorUserId) {
        this.originatorUserId = originatorUserId;
    }

    public String getProcessCode() {
        return processCode;
    }

    public void setProcessCode(String processCode) {
        this.processCode = processCode;
    }

    public String getDeptId() {
        return deptId;
    }

    public void setDeptId(String deptId) {
        this.deptId = deptId;
    }

    public String getMicroappAgentId() {
        return microappAgentId;
    }

    public void setMicroappAgentId(String microappAgentId) {
        this.microappAgentId = microappAgentId;
    }

    public String getCcPosition() {
        return ccPosition;
    }

    public void setCcPosition(String ccPosition) {
        this.ccPosition = ccPosition;
    }

    public String getRequestId() {
        return RequestId;
    }

    public void setRequestId(String RequestId) {
        this.RequestId = RequestId;
    }

    public List<ApproversBean> getApprovers() {
        return approvers;
    }

    public void setApprovers(List<ApproversBean> approvers) {
        this.approvers = approvers;
    }

    public List<String> getCcList() {
        return ccList;
    }

    public void setCcList(List<String> ccList) {
        this.ccList = ccList;
    }

    public List<TargetSelectActionersBean> getTargetSelectActioners() {
        return targetSelectActioners;
    }

    public void setTargetSelectActioners(List<TargetSelectActionersBean> targetSelectActioners) {
        this.targetSelectActioners = targetSelectActioners;
    }

    public List<FormComponentValuesBean> getFormComponentValues() {
        return formComponentValues;
    }

    public void setFormComponentValues(List<FormComponentValuesBean> formComponentValues) {
        this.formComponentValues = formComponentValues;
    }

    public static class ApproversBean {
        /**
         * actionType : String
         * userIds : ["String"]
         */

        /**
         * 审批类型，取值：
         * <p>
         * AND：会签
         * <p>
         * OR：或签
         * <p>
         * NONE：单人审批
         */
        private String actionType;
        private List<String> userIds;

        public String getActionType() {
            return actionType;
        }

        public void setActionType(String actionType) {
            this.actionType = actionType;
        }

        public List<String> getUserIds() {
            return userIds;
        }

        public void setUserIds(List<String> userIds) {
            this.userIds = userIds;
        }
    }

    public static class TargetSelectActionersBean {
        /**
         * actionerKey : String
         * actionerUserIds : ["String"]
         */

        private String actionerKey;
        private List<String> actionerUserIds;

        public String getActionerKey() {
            return actionerKey;
        }

        public void setActionerKey(String actionerKey) {
            this.actionerKey = actionerKey;
        }

        public List<String> getActionerUserIds() {
            return actionerUserIds;
        }

        public void setActionerUserIds(List<String> actionerUserIds) {
            this.actionerUserIds = actionerUserIds;
        }
    }

    public static class FormComponentValuesBean {
        /**
         * name : String
         * value : String
         */

        private String name;
        private String value;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getValue() {
            return value;
        }

        public void setValue(String value) {
            this.value = value;
        }
    }

    @Override
    public String toString() {
        String str = "DingProcessInstanceWirteDTO{" +
                "originatorUserId='" + originatorUserId + '\'' +
                ", processCode='" + processCode + '\'' +
                ", deptId='" + deptId + '\'' +
                ", microappAgentId='" + microappAgentId + '\'' +
                ", ccPosition='" + ccPosition + '\'' +
                ", RequestId='" + RequestId + '\'' +
                ", approvers=" + approvers +
                ", ccList=" + ccList +
                ", targetSelectActioners=" + targetSelectActioners +
                ", formComponentValues[";
        boolean isFirst = true;
        for (FormComponentValuesBean bean : this.formComponentValues) {
            if (!isFirst)
                str += ",";
            str += "{name=" + bean.getName() + ",value=" + bean.getValue() + "}";

            isFirst = false;
        }
        str += "]}";
        return str;
    }
}
